/*
 * Blink
 * Turns on an LED on for one second,
 * then off for one second, repeatedly.
 */

#include <Arduino.h>
#include <HardwareSerial.h>

// Set LED_BUILTIN if it is not defined by Arduino framework
 #define LED_BUILTIN1 26


// void setup()
// {
//   Serial.begin(115200);
//   // initialize LED digital pin as an output.
//   pinMode(LED_BUILTIN1, INPUT);
// }

// void loop()
// {
//   // turn the LED on (HIGH is the voltage level)
//   // uint16_t val = analogRead(LED_BUILTIN1);
//   // String z = String(val,4);
//   Serial.println(String(analogRead(LED_BUILTIN1), DEC));
//   // wait for a second
//   delay(1000);
//   // turn the LED off by making the voltage LOW
  
// }

int val = 0;           
 
void setup()
{
  //Arduino串口通讯初始化 
  Serial.begin(115200); 
}
 
void loop()
{
  //读取引脚A0输入信号
  val = analogRead(26);   
 
  //将A0输入信号转换为0-1023之间的数值
  //并且通过串口监视器显示 
  Serial.println(val); 
 delay(300);
}